home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / programer2 / gnust / test / floatmath < prev    next >
Text File  |  1991-09-13  |  603b  |  49 lines

  1. "Test floating point operations"
  2.  
  3. "======================================================================
  4. |
  5. | Copyright (C) 1988, 1989  Steven B. Byrne.
  6. | All rights reserved.
  7. |
  8.  ======================================================================"
  9.  
  10. ^3.1!
  11.  
  12. ^3.45!
  13.  
  14. ^3.0e4!
  15.  
  16. ^3.45e4!
  17.  
  18. ^3.4 + 4.3!
  19.  
  20. ^-5.5 - 3.12!
  21.  
  22. ^5.6 < 5.5!
  23. ^5.5 < 5.6!
  24.  
  25. ^5.6 > 5.5!
  26. ^5.5 > 5.6!
  27.  
  28. ^3.4 <= 3.4!
  29. ^3.6 >= 2.5!
  30.  
  31. ^3.12345 = 3.12345!
  32.  
  33. ^4.5 ~= 5.67!
  34.  
  35. ^4.5 * 0.0004!
  36.  
  37. ^4.5 / 0.0004!
  38.  
  39. ^3.14159 truncated!
  40.  
  41. ^3.1415926535 fractionPart!
  42.  
  43. ^4523.234 exponent!
  44.  
  45. ^45.0 timesTwoPower: 4!
  46. ^45.0 timesTwoPower: -4!
  47.  
  48. " ### need more tests"
  49.